import request from '@/utils/request2'

// 查询日程安排列表
export function listSchedule(query) {
  return request({
    url: '/oa/schedule/list',
    method: 'get',
    params: query
  })
}

// 查询日程安排详细
export function getSchedule(id) {
  return request({
    url: '/oa/schedule/' + id,
    method: 'get'
  })
}

// 新增日程安排
export function addSchedule(data) {
  return request({
    url: '/oa/schedule',
    method: 'post',
    data: data
  })
}

// 修改日程安排
export function updateSchedule(data) {
  return request({
    headers: {
      'Content-Type': 'application/json'
    },
    url: '/oa/schedule/edit',
    method: 'POST',
    data: JSON.stringify(data)
  })
}

// 删除日程安排
export function delSchedule(id) {
  return request({
    url: '/oa/schedule/remove/' + id,
    method: 'GET'
  })
}

// 导出日程安排
export function exportSchedule(query) {
  return request({
    url: '/oa/schedule/export',
    method: 'get',
    params: query
  })
}
